<extend name="Public/base" />
 
<block name='style'>
  <style>
	 .uneditable-input, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"] {
	 	font-size: 12px;
	 	min-height: 30px;
	 }
	
	 input[type="radio"]:checked + .custom-radio:before{
	 	text-indent:-2px;
	 }
	
	 ._percent{
	 	height: 30px;
	    line-height: 30px;
	    padding-left: 5px;
	 }
	 input.opth50{
	 	float:left;
	 	text-align:right;
	 }
	 .pannel_diy .col-sm-2{
	 	padding-left:0px;
	 }
	 .gowhere{
	 	text-align:left;
	 	text-indent:5px;
	 }
	 .pannel_diy {
	 	margin-top:-1px;
	 	margin-bottom:0px;
	 	padding:0px 10px;
	 }
	 .parsley-error-list{
	 	width:100%;
	 	float:left;
	 }

	.recommend_table thead th{text-align: center;}
	.fl{float:left;}
	.fr{float: right;} 
	.txt_right{text-align:right;}
	.txt_left{text-align:left;}
	.txt_center{text-align:center;}
	
	#weight_unit{margin-top:-7px;width:60px}
	.form-control-equal{width:50% !important;}
	.form-control-three-equal{width:30% !important;}
	.form-control-four-equal{width:25% !important;}
	.radio-inline, .checkbox-inline{padding-left:0px;}
	
	.page-content{padding:10px; background: #efefef;}
	.help-block{margin-bottom:0px;}
	.edit_pic_wrp_one{width: 100px !important;}
	.edit_pic_wrp_one img{   
		 width: 50px !important;
	     height: 50px !important;
	}
	.pics_wrp .edit_pic_wrp .edit_pic_mask_one{
        width: 100%;
	    height: 30px;
	    background: rgba(229,229,229,0.9) !important;
	    text-align: center;
	    left: 0;
	    bottom: 0;
	    vertical-align: middle;
	    line-height: 20px;
	}
	.pics_wrp .edit_pic_wrp{position:relative;}
	.ml5{margin-left:5px !important;}
	.mb5{margin-bottom:5px !important;}
	.edui-default .edui-toolbar{width:100% !important;overflow: auto !important;}
	
	.pics_wrp .edit_pic_wrp .edit_pic_mask{height:45px;}
	
	/* .form-group-validate{margin-bottom:0px !important;} */
	.Validform_checktip{width:100%;float:left;}
	.first-pic-show-table td{background-color:#fff !important;}
    .control-label{
   padding-top: 0px !important;
    }
  </style>
</block>


<block name="body">

    <!-- 弹窗插件 -->
    <include file="Public:artdialog" />
    <!-- 表单验证插件 -->
    <include file="Public:validform" />


    <form action="{:U('editAttrItems')}" method="post" role="form" class="form-horizontal row-border vform">
        <input type="hidden" name="goods_id" value="{$goods['goods_id']}">

        <div class="row">
            <div class="col-md-12">
                <div class="block-web">
                    <div class="header">
                        <h3 class="content-header">
                            商品信息编辑
                        </h3>
                    </div>
                    <div class="porlets-content">

                        <div class="form-group">
                            <label class="col-sm-2 control-label">商品名称</label>
                            <div class="col-sm-9 ">
                               {$goods['goods_name']}
                            </div>
                        </div>
                        
						<div class="form-group">
                            <label class="col-sm-2 control-label">零售价</label>
                            <div class="col-sm-9">
                                {$goods['retail_price']|default=0.00}
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">会员价</label>
                            <div class="col-sm-9">
                                {$goods['shop_price']|default=0.00}
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">VIP价</label>
                            <div class="col-sm-9">
                                {$goods['vip_price']|default=0.00}
                            </div>
                        </div>
                        
                        <div class="form-group" style="display:none;">
                            <label class="col-sm-2 control-label">当前返点系数</label>
                            <div class="col-sm-9">
                                {$goods['goods_point']|default='0.00'}
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">实际库存</label>
                            <div class="col-sm-9">
                               {$goods['goods_number']}
                            </div>
                        </div> 
						<div class="form-group">
                            <label class="col-sm-2 control-label">待发货数</label>
                            <div class="col-sm-9">
                               {$goods['wait_sendgoods_stock']|default=0}
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <label class="col-sm-2 control-label">可售库存</label>
                            <div class="col-sm-9">
                               {$goods['can_sales_num']}
                            </div>
                        </div>
						
                        <div class="form-group">
                            <div id="create_table_div">
                                <table class="table table-striped goods_list_table table-bordered">
                                    <thead>
                                        <tr>
                                            <th>货号(SKU)/条形码</th>
											<th>属性规格</th>
											<th>邮寄重量(克)</th>
											<th>零售价配置</th>
											<th>会员价配置</th>
											<th>VIP价配置</th>
                                        </tr>
                                    </thead>
                                    
                                    <tbody>
                                            <tr id="g_items_{$goods['goods_id']}">
                                                <td>
                                                    <div class='goodspricesettingdiv'>
                                                货号： {$goods['goods_sn']|default='-'}</div>
                                                    <div class='goodspricesettingdiv'>
                                                    条形码：{$goods['bar_code']|default='-'}</div>
                                                </td>
                                                <td>
                                                <if condition="$goods['is_general'] eq 1">
                                                    <font class='red'>入口SKU<br/>没有规格商品<br/>以该配置为准</font>
                                                </if>
                                                    {$goods['attribute_text']}
                                                </td>
                                                <td>
                                                    <div class='goodspricesettingdiv'> <input name="goods_weight{$goods['goods_id']}" class='diyvinput'   value="{:($goods['goods_weight']*1000)}" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/" /></div>
                                                </td>
                                                <td>
                                                    <div class='goodspricesettingdiv'><input name="retail_price{$goods['goods_id']}" class='diyvinput'   value="{$goods['retail_price']}" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/" /></div>
                                                </td> 
                                                <td>
                                                    <div class='goodspricesettingdiv'><input name="shop_price{$goods['goods_id']}" class='diyvinput' datatype='*' value="{$goods['shop_price']}" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/" /></div>
                                                </td>
                                                <td>
                                                    <div class='goodspricesettingdiv'><input name="vip_price{$goods['goods_id']}" class='diyvinput'  value="{$goods['vip_price']}" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/" /></div>
                                                </td>
                                            </tr> 
                                        
                                    </tbody>
                                    
                                </table>
                            </div>
                        </div>
                    </div><!--/porlets-content-->
                </div><!--/block-web-->
            </div>

        </div>


        <div class="footer" >
            <button class="btn btn-primary btn-success bt_submit" type="submit">提交</button>
            <button class="btn btn-default bt_close" type="button" onclick="art.dialog.open.api.close();">关闭</button>
        </div>
    </form>

</block>

<block name="script">
  
</block>

